package com.ynkbny.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ynkbny.base.PageResult;
import com.ynkbny.domain.TaskLog;
import com.ynkbny.domain.User;
import com.ynkbny.service.TaskLogService;
import com.ynkbny.mapper.TaskLogMapper;
import com.ynkbny.util.SearchUtil;
import org.springframework.stereotype.Service;

/**
 * @author 杨亚
 * @version 1.0.0
 * @title 针对表【td_sm_task_log】的数据库操作Service实现
 * @description 针对表【td_sm_task_log】的数据库操作Service实现
 * @create 2023-11-16 11:42:07
 **/
@Service
public class TaskLogServiceImpl extends ServiceImpl<TaskLogMapper, TaskLog>
    implements TaskLogService{

    @Override
    public PageResult<TaskLog> pageList(String conditionJson, int pageNum, int pageSize) {
        Page<TaskLog> page = new Page<>(pageNum, pageSize);
        QueryWrapper<TaskLog> queryWrapper = SearchUtil.parseWhereSql(null, null, conditionJson);
        queryWrapper.orderByDesc("start_time");
        return new PageResult<>(this.baseMapper.selectPage(page, queryWrapper));
    }
}




